home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / misc / btngo.zip / BTNGO.DOC next >
Text File  |  1993-08-02  |  9KB  |  168 lines

  1. BTNGO.EXE (VERSION 1.0)                     Copyright (c) John Deurbrouck
  2. -------------------------------------------------------------------------
  3.             First Published in PC Magazine September 14, 1993 (Utilities)
  4. -------------------------------------------------------------------------
  5. BTNGO BY JOHN DEURBROUCK
  6.  
  7.       One-click launching can replace a crowded Program Manager's
  8.       multichoice selection process for your favorite apps.
  9.  
  10.       Has your Program Manager screen become so cluttered that you must
  11. double-click on a group and then double-click on an icon just to launch
  12. one of your most often-used applications? If so, this issue's utility,
  13. BTNGO (for ButtonGo), will provide you with a convenient alternative.
  14.  
  15.       BTNGO lets you set up a button bar that displays the icons of just
  16. the programs you run most frequently. All you have to do is click once on
  17. any button, and the program is launched. BTNGO uses the Program Manager's
  18. facilities to create the icon group. Under Windows 3.1, the utility's
  19. button bar can even float above other Windows applications, so you don't
  20. have to return to the Program Manager in order to switch to another
  21. program. BTNGO is also compatible with Windows 3.0, with some limitations,
  22. which will be discussed in the course of this article.
  23.  
  24.       The source code is compatible with both Borland C++ 3.1 and
  25. Visual C++ 1.0, though if you need to produce a Windows 3.0-compatible
  26. executable, you must use the Borland rather than the Microsoft compiler.
  27.  
  28. INSTALLING AND USING BTNGO
  29.  
  30.      After copying BTNGO onto your hard disk, you can get a quick idea
  31. of how the utility works by using the Program Manager's FileRun command.
  32. When started in this way, BTNGO brings up a dialog box that allows you
  33. to choose an already-established Program Manager group (.GRP) file to
  34. load. Select one of these, click OK, and BTNGO will transform the group
  35. into a button bar. A single (or double) click on a BTNGO button will
  36. then launch the corresponding program.
  37.  
  38.       Group filenames can be somewhat cryptic. It's a good guess that
  39. your Accessories group has the default filename of ACCESSOR.GRP, but it
  40. may not. One way to check is through Program Manager. If the desired
  41. group is opened, you must first minimize it. Then select FileProperties
  42. (or, in Windows 3.1, hit Alt-Enter). The dialog box that is displayed
  43. shows both the group's name (for example, Accessories) and the filename
  44. (for example, C:\WINDOWS\ACCESSOR.GRP). Use the filename you find to
  45. create the ButtonGo button bar.
  46.  
  47.       You'll notice that BTNGO's caption bar normally displays ButtonGo
  48. and the name of the group file you've loaded. If you click and hold down
  49. the left mouse button on any BTNGO button, however, the caption will
  50. change to show both the name you've given that program icon and the
  51. executable filename. For example, the README.WRI file in Windows' Main
  52. group will be displayed as ``Read Me (README.WRI).'' If you don't want
  53. to activate a button you've pressed, just drag the pointer off the
  54. button bar before letting up the mouse button.
  55.  
  56.       While holding down the left mouse button, you can also drag the
  57. mouse pointer over other buttons and see their names on the caption bar.
  58. This is important when you have duplicate icons. You might, for example,
  59. have several Notepad icons, each of which opens a different file. Holding
  60. down the left mouse button in this case will tell you which file will
  61. be opened. Because BTNGO uses group files, you can use Program Manager
  62. to modify your icons and names so they work well for you on the title bar.
  63. But if you make a change in Program Manager, you'll have to restart BTNGO
  64. before you'll see the change.
  65.  
  66.       To create your own Program Manager group for BTNGO, select FileNew,
  67. click on Program Group, and then click on OK. Give the new group a
  68. description and a filename and click OK again. Next, hold down the Ctrl
  69. key and drag the icons for the programs you want on your button bar into
  70. your new group. By holding down the Ctrl key in this step, you make
  71. copies of your icons. This allows you to take advantage of BTNGO without
  72. disturbing your original group organization.
  73.  
  74.       You can also create an association between BTNGO and the .GRP
  75. extension. To do this, open the File Manager and select FileAssociate.
  76. Type GRP in the Files with Extension field, then type in the fully
  77. qualified application name (for example, C:\UTILS\BTNGO.EXE).
  78. In Windows 3.1, you can click the Browse button to open the Browse
  79. dialog box, select BTNGO.EXE and click OK, then click OK again.
  80. Double-clicking on a .GRP file in the File Manager will now bring up
  81. that group as a BTNGO button bar. You'll now also be able to drag a
  82. .GRP filename from File Manager right into a Program Manager group.
  83. The BTNGO icon will appear, and double-clicking on it will produce a
  84. button bar for that group.
  85.  
  86.       Once an association between BTNGO and the .GRP extension has
  87. been created, it becomes easy to automatically start BTNGO each time
  88. you enter Windows. Simply add the name of a group file to a RUN= line
  89. in the [Windows] section of WIN.INI (for example, RUN=C:\WINDOWS\UTILS.GRP),
  90. or if you're running Windows 3.1, add the .GRP file you want to your
  91. Startup group.
  92.  
  93.       You can bypass the Choose .GRP file dialog box by specifying a
  94. group file when you start BTNGO. Indeed, under Windows 3.0, you must
  95. explicitly name a .GRP file on the command line unless one of your
  96. applications has installed the COMMDLG.DLL file on your system or you've
  97. created an association in the manner described above. For example,
  98. entering the following line:
  99.  
  100.                      C:\UTILS\BTNGO C:\WINDOWS\MAIN.GRP
  101.  
  102.  
  103. in the Program Manager FileRun dialog box will display the button bar
  104. immediately. If you specify this command on the Program Item Properties
  105. command line, you won't have to select the group file each time the
  106. program starts.
  107.  
  108.       As you maintain your group files, you will want to be careful that
  109. they don't get too large if you intend to use them with BTNGO. Since
  110. the button bar arranges all its icons side by side, a group with too
  111. many icons will extend off the screen and some icons may not even appear.
  112. You can avoid this problem by breaking larger groups you want to use
  113. with BTNGO into smaller ones.
  114.  
  115.       When running under Windows 3.1 or later, BTNGO defaults to
  116. displaying itself as a topmost window. In this way, like the Windows
  117. Clock accessory, BTNGO can remain visible even when a full-screen
  118. application is in use. If you find this inconvenient, you simply
  119. need to uncheck the Always On Top option in BTNGO's system menu.
  120. BTNGO stores this preference--along with the last place on the
  121. screen where you put your button bar--in a private BTNGO.INI file
  122. that is created automatically in the same directory that contains
  123. BTNGO.EXE.
  124.  
  125.       If you look inside BTNGO.INI, you'll see that there is a section
  126. for each group file you've used with BTNGO. This allows you, for example,
  127. to keep your Main group displayed permanently atop other windows and
  128. aligned in the lower-right corner of your screen, while your Accessories
  129. group might be in the center of the screen and not float above other
  130. windows.
  131.  
  132.       Notice that BTNGO.INI uses the fully qualified pathname for each
  133. group file as a section header. This enables BTNGO to operate independently
  134. of Program Manager. Program Manager displays only the group files named
  135. in PROGMAN.INI. Once a .GRP file is created, however, BTNGO can use it
  136. even if Program Manager doesn't know about it. Thus, for example, if you
  137. manually remove all references to MAIN.GRP from PROGMAN.INI, the Main
  138. group will no longer be displayed in the Program Manager. But BTNGO will
  139. still be able to open MAIN.GRP, and will retain your Always On Top and
  140. location preferences from session to session.
  141.  
  142.       BTNGO's independence from Program Manager can create one minor
  143. integration problem. For example, if you make changes to your Main group
  144. in Program Manager and then load MAIN.GRP into BTNGO, you may find that
  145. the new arrangement is not reflected on the button bar. This is because
  146. Program Manager doesn't necessarily write to the .GRP file until you
  147. exit Windows. Windows will rewrite the .GRP file immediately after some
  148. changes, but not after others.
  149.  
  150.       With Windows 3.1, you can force Program Manager to update the group
  151. files with a little trick. Just hold down the Shift key while you select
  152. Program Manager's FileExit Windows command with either the keyboard or
  153. the mouse. This won't cause you to exit Windows, but it will cause the
  154. Program Manager to update the group files! If you do this after you've
  155. made changes and then launch BTNGO, your button bar will have the correct
  156. contents.
  157.  
  158.       One important caution is in order: Don't edit PROGMAN.INI from
  159. within Windows. To add or remove group file names in PROGMAN.INI, always
  160. exit to the DOS prompt and use a DOS text editor to make the changes in
  161. PROGMAN.INI, then restart Windows. Otherwise, your changes may be
  162. overwritten or the .INI file may become corrupted.
  163.  
  164.       Removing BTNGO from your system is easy: Just delete BTNGO.EXE
  165. and BTNGO.INI. BTNGO doesn't create or modify any other files.
  166. ---------------------------------------------------------------------------
  167. JOHN DEURBROUCK IS A C AND ASSEMBLY LANGUAGE PROGRAMMER.
  168.